package com.qch.bean;

import com.qch.service.HelloService;
import com.qch.service.WorkService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;

/**
 * @Author qch
 * @Date 2021/2/15
 */
@Component
public class ConsumerComponet {
    /**
     * 引用dubbo的组件
     */
    //@Reference(loadbalance = "onlyFirst")
    @Reference
    private HelloService helloService;
    @Reference
    private WorkService workService;
    public String sayHello(String name,int timeTowait){
       return helloService.sayHello(name,timeTowait);
    }
    public String methodA(String name,int timeTowait){
        return workService.methodA(name,timeTowait);
    }
    public String methodB(String name,int timeTowait){
        return workService.methodB(name,timeTowait);
    }
    public String methodC(String name,int timeTowait){
        return workService.methodC(name,timeTowait);
    }
}
